package com.cadre.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cadre.common.utils.oldutil.PageUtils;
import com.cadre.common.utils.oldutil.Query;
import com.cadre.system.domain.officer.ConfernamelistEntity;
import com.cadre.system.domain.officer.MeetPersonMessage;
import com.cadre.system.mapper.ConfernamelistMapper;
import com.cadre.system.service.ConfernamelistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.cadre.system.domain.officer.tabMenu;

import java.util.List;
import java.util.Map;

@Service("confernamelistService")
public class ConfernamelistServiceImpl extends ServiceImpl<ConfernamelistMapper, ConfernamelistEntity> implements ConfernamelistService {
    @Autowired
    private ConfernamelistMapper confernamelistMapper;

    @Override // com.tdqy.cadre.modular.profess.service.ConfernamelistService
    public PageUtils queryPage(Map<String, Object> params) {
        return new PageUtils(this.baseMapper.selectPage(new Query(params).getPage(), new LambdaQueryWrapper<>()));
    }

    @Override
    public List<MeetPersonMessage> getListByBatchId(Map<String, Object> param) {
        return this.baseMapper.getListByBatchId(param);
    }

    @Override // com.tdqy.cadre.modular.profess.service.ConfernamelistService
    public List<ConfernamelistEntity> getConfernamelist(String batchId, Long deptId) {
        LambdaQueryWrapper<ConfernamelistEntity> lambdaQueryWrapper = new LambdaQueryWrapper();
        lambdaQueryWrapper.eq(ConfernamelistEntity::getBatchid, batchId);
        lambdaQueryWrapper.eq(ConfernamelistEntity::getSubmissdept, deptId);
        return this.baseMapper.selectList(lambdaQueryWrapper);
    }

    @Override
    public List<tabMenu> tabmenu(String batchid) {
        return this.baseMapper.tabmenu(batchid);
    }

    @Override // com.tdqy.cadre.modular.profess.service.ConfernamelistService
    @Transactional(rollbackFor = {Exception.class})
    public int updateByPrimaryKeySelective(ConfernamelistEntity record) {
        return this.confernamelistMapper.updateByPrimaryKeySelective(record);
    }

    @Override // com.tdqy.cadre.modular.profess.service.ConfernamelistService
    public List<ConfernamelistEntity> selectByMaps(Map<String, Object> map) {
        return this.confernamelistMapper.selectByMaps(map);
    }

    @Override // com.tdqy.cadre.modular.profess.service.ConfernamelistService
    public List<MeetPersonMessage> getUpMeetList(Map<String, Object> map) {
        return this.confernamelistMapper.getUpMeetList(map);
    }

    @Override // com.tdqy.cadre.modular.profess.service.ConfernamelistService
    public List<ConfernamelistEntity> getUpMeetByMap(Map<String, Object> map) {
        return this.confernamelistMapper.getUpMeetByMap(map);
    }
}
